<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<% 
	String homeMenuClass = "";
	String vocMenuClass = "";
	String grammarMenuClass = "";
	String marketplaceMenuClass = "";
	String signupMenuClass = "";
	String loginMenuClass = "";
	String logoutMenuClass = "";
	if ("home".equals((String)session.getAttribute("pageName"))) {
		homeMenuClass = "class='nav-menu-item-selected'";
   	} else if ("vocabulary".equals((String)session.getAttribute("pageName"))) {
		vocMenuClass = "class='nav-menu-item-selected'";
   	} else if ("grammar".equals((String)session.getAttribute("pageName"))) {
		grammarMenuClass = "class='nav-menu-item-selected'";
   	} else if ("marketplace".equals((String)session.getAttribute("pageName"))) {
		marketplaceMenuClass = "class='nav-menu-item-selected'";
   	} else if ("signup".equals((String)session.getAttribute("pageName"))) {
		signupMenuClass = "class='nav-menu-item-selected'";
   	} else if ("login".equals((String)session.getAttribute("pageName"))) {
		loginMenuClass = "class='nav-menu-item-selected'";
   	} else if ("logout".equals((String)session.getAttribute("pageName"))) {
		logoutMenuClass = "class='nav-menu-item-selected'";
   	} // if 
%>
<div class="navigation-menu-wrapper">
	<ul class="navigation-menu">
		<li><span <%=homeMenuClass%>><a href="<c:url value='/homePage'/>">Home</a></span></li>
		<li><span <%=vocMenuClass%>><a href="<c:url value='/vocabularyPage'/>">Vocabulary</a></span></li>
		<li><span <%=grammarMenuClass%>><a href="<c:url value='/grammarPage'/>">Grammar</a></span></li>
		<li><span <%=marketplaceMenuClass%>><a href="<c:url value='/otherPages/marketplacePage'/>">Marketplace</a></span></li>
		<c:choose>
			<c:when test="${loginOkay == ''}">
					<li><span <%=signupMenuClass%>><a href="<c:url value='/signupPage'/>">Sign up!</a></span></li>
					<li><span <%=loginMenuClass%>><a href="<c:url value='/loginPage'/>">Log in</a></span></li>
			</c:when>
			<c:otherwise>
					<li><span <%=logoutMenuClass%>><a class="nav-logout" href="<c:url value='/loginPage?logout=1'/>">Log out</a></span></li>
			</c:otherwise>
		</c:choose>
	</ul>
</div>
